.class public Lcom/waiqin365/base/db/cmfilteritem/b;
.super Ljava/lang/Object;


# static fields
.field public static a:Lcom/waiqin365/base/db/cmfilteritem/b;


# instance fields
.field private b:Lcom/waiqin365/base/db/cmfilteritem/c;

.field private c:Lcom/waiqin365/base/db/cmfilteritem/f;

.field private d:Landroid/database/sqlite/SQLiteDatabase;

.field private e:Lcom/waiqin365/base/db/cmfilteritem/CMFilterItemDao;


# direct methods
.method private constructor <init>()V
    .locals 4

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Lcom/waiqin365/base/db/cmfilteritem/d;

    invoke-static {}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->b()Lcom/fiberhome/gaea/client/base/ExmobiApp;

    move-result-object v1

    const-string/jumbo v2, "xUtils.db"

    const/4 v3, 0x0

    invoke-direct {v0, v1, v2, v3}, Lcom/waiqin365/base/db/cmfilteritem/d;-><init>(Landroid/content/Context;Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$CursorFactory;)V

    invoke-virtual {v0}, Lcom/waiqin365/base/db/cmfilteritem/d;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/base/db/cmfilteritem/b;->d:Landroid/database/sqlite/SQLiteDatabase;

    new-instance v0, Lcom/waiqin365/base/db/cmfilteritem/c;

    iget-object v1, p0, Lcom/waiqin365/base/db/cmfilteritem/b;->d:Landroid/database/sqlite/SQLiteDatabase;

    invoke-direct {v0, v1}, Lcom/waiqin365/base/db/cmfilteritem/c;-><init>(Landroid/database/sqlite/SQLiteDatabase;)V

    iput-object v0, p0, Lcom/waiqin365/base/db/cmfilteritem/b;->b:Lcom/waiqin365/base/db/cmfilteritem/c;

    iget-object v0, p0, Lcom/waiqin365/base/db/cmfilteritem/b;->b:Lcom/waiqin365/base/db/cmfilteritem/c;

    sget-object v1, Lde/greenrobot/dao/identityscope/IdentityScopeType;->None:Lde/greenrobot/dao/identityscope/IdentityScopeType;

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/cmfilteritem/c;->a(Lde/greenrobot/dao/identityscope/IdentityScopeType;)Lcom/waiqin365/base/db/cmfilteritem/f;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/base/db/cmfilteritem/b;->c:Lcom/waiqin365/base/db/cmfilteritem/f;

    iget-object v0, p0, Lcom/waiqin365/base/db/cmfilteritem/b;->c:Lcom/waiqin365/base/db/cmfilteritem/f;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/cmfilteritem/f;->a()Lcom/waiqin365/base/db/cmfilteritem/CMFilterItemDao;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/base/db/cmfilteritem/b;->e:Lcom/waiqin365/base/db/cmfilteritem/CMFilterItemDao;

    return-void
.end method

.method public static a()Lcom/waiqin365/base/db/cmfilteritem/b;
    .locals 1

    sget-object v0, Lcom/waiqin365/base/db/cmfilteritem/b;->a:Lcom/waiqin365/base/db/cmfilteritem/b;

    if-nez v0, :cond_0

    new-instance v0, Lcom/waiqin365/base/db/cmfilteritem/b;

    invoke-direct {v0}, Lcom/waiqin365/base/db/cmfilteritem/b;-><init>()V

    sput-object v0, Lcom/waiqin365/base/db/cmfilteritem/b;->a:Lcom/waiqin365/base/db/cmfilteritem/b;

    :cond_0
    sget-object v0, Lcom/waiqin365/base/db/cmfilteritem/b;->a:Lcom/waiqin365/base/db/cmfilteritem/b;

    return-object v0
.end method


# virtual methods
.method public a(Lcom/waiqin365/base/db/cmfilteritem/a;)V
    .locals 1

    :try_start_0
    iget-object v0, p0, Lcom/waiqin365/base/db/cmfilteritem/b;->e:Lcom/waiqin365/base/db/cmfilteritem/CMFilterItemDao;

    invoke-virtual {v0, p1}, Lcom/waiqin365/base/db/cmfilteritem/CMFilterItemDao;->insertOrReplace(Ljava/lang/Object;)J
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public a(Ljava/lang/String;)V
    .locals 1

    :try_start_0
    iget-object v0, p0, Lcom/waiqin365/base/db/cmfilteritem/b;->e:Lcom/waiqin365/base/db/cmfilteritem/CMFilterItemDao;

    invoke-virtual {v0, p1}, Lcom/waiqin365/base/db/cmfilteritem/CMFilterItemDao;->deleteByKey(Ljava/lang/Object;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public b()Ljava/util/List;
    .locals 1

    :try_start_0
    iget-object v0, p0, Lcom/waiqin365/base/db/cmfilteritem/b;->e:Lcom/waiqin365/base/db/cmfilteritem/CMFilterItemDao;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/cmfilteritem/CMFilterItemDao;->loadAll()Ljava/util/List;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    :goto_0
    return-object v0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    const/4 v0, 0x0

    goto :goto_0
.end method

.method public c()V
    .locals 1

    :try_start_0
    iget-object v0, p0, Lcom/waiqin365/base/db/cmfilteritem/b;->e:Lcom/waiqin365/base/db/cmfilteritem/CMFilterItemDao;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/cmfilteritem/CMFilterItemDao;->deleteAll()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method
